import { SET_LIST } from './actions'

export interface IAction {
	type: string
	payload: any
}

const initState = {
	list: []
}

const reducer = (state = initState, action: IAction) => {
	switch (action.type) {
		case SET_LIST:
			return {
				...state,
				list: action.payload
			}
		default:
			return state
	}
}


export default reducer